
<div style="clear: both"></div>
<table style="width:100%;text-align: center" id="table" class="layui-table">

        <tbody >
        <tr hidden="true">
            <td>

            </td>
        </tr>
        <tr>
            <td>人员类型</td>
            <td>
                <textarea class="windowName" style="display: none;">${windowName}</textarea>
                <input type="radio" name="userType" value="start" memo="发起人"
                    <#if userType == 'start' >checked="checked"</#if>   /><span>发起人</span>
                <input type="radio" name="userType" value="prev" memo="上一步执行者"
                    <#if userType == 'prev' >checked="checked"</#if>   /><span>上一步执行者</span>
            </td>
        </tr>
        <#if !isOrg >
        <tr>
            <td>类型</td>
            <td>
                <input type="radio" name="type" value="director" memo="负责人"
                    <#if type == 'director' >checked="checked"</#if>   /><span>负责人</span>
                <input type="radio" name="type" value="leader" memo="领导"
                    <#if type == 'leader' >checked="checked"</#if>   /><span>领导</span>
            </td>
        </tr>
        <#else>
        <tr>
            <td>组织类型</td>
            <td>
                <input type="radio" name="type" value="org" memo="相同部门"
                    <#if type == 'org' >checked="checked"</#if>   /><span>相同部门</span>
            <#--
                <input type="radio" name="type" value="job" memo="相同职务"
                    <#if type == 'job' >checked="checked"</#if>   /><span>相同职务</span>
                <input type="radio" name="type" value="pos" memo="相同岗位"
                    <#if type == 'pos' >checked="checked"</#if>   /><span>相同岗位</span>
            -->
            </td>
        </tr>
        </#if>
        </tbody>
    </table>
</div>
    <div>
        <input type="hidden" name="isOrg" value="${isOrg}">
        <!--<input type="hidden" name="userId" value="${userId }">-->
    </div>
<!--<div class="layui-btn-container" style="text-align: center;position: absolute;bottom: 15px;left: 0px;right: 0px;">-->
    <!--<button class="layui-btn" lay-submit lay-filter="varForm" id="save">保存</button>-->
    <!--<button class="layui-btn layui-btn-danger" id="close">关闭</button>-->
<!--</div>-->
<script>
    layui.use(['table', 'layer'], function () {
        var layer = layui.layer;
        var table = layui.table;
        var setter = layui.setter;
        var $ = layui.$;


        //保存
        $(document).on('click', '#save', function () {

            //获取选中的按钮
            var type    = $("input[name=type]:checked").val();
            var userType= $("input[name=userType]:checked").val();
            var isOrg   = $("input[name=isOrg]").val();
            var varTypeName    = $("input[name=type]:checked").attr("memo");
            var varUserTypeName= $("input[name=userType]:checked").attr("memo");

            var hiddenJson ='{type:\"'+type+'\",userType:\"'+userType+'\"}';
            var showTxt;
            if(!isOrg){
                //执行人
                showTxt=varUserTypeName +"的"+varTypeName;
            }else{
                //执行人的部门
                showTxt='与'+varUserTypeName +'具有'+varTypeName;;
            }
            //对前弹窗的文本域赋值
            $(".hiddenJson").html(hiddenJson);
            $(".textarea").html(showTxt);
            //关闭弹窗
            layer.close(layer.index);
            return false;
        });
        //取消
        $(document).on('click', '#close', function () {
            layer.close(layer.index);
        });
    })
</script>
